package com.flashflexpro.flexdirector.model{

import mx.collections.ArrayCollection;

[Bindable]
[RemoteClass]
public class DtoActInput extends NameAndComment{


    public function DtoActInput(){
        name = "Unnamed input";
    }

    public var actName:String;
    
    [ArrayElementType("com.flashflexpro.flexdirector.model.CodeStringValue")]
    public var args:ArrayCollection = new ArrayCollection();

    override public function copyInto ( parent:NameAndComment, newType:Class ):NameAndComment {
        var rt:DtoActInput = super.copyInto (parent, DtoActInput ) as DtoActInput;

        var values:ArrayCollection = new ArrayCollection ();
        for (var i:int; i < args.length; i ++) {
            var csv:CodeStringValue = args.getItemAt( i ) as CodeStringValue;
            values.addItem( csv.clone() as CodeStringValue );
        }
        rt.args = values;
        rt.actName = actName;
        return rt;
    }

}
}